package com.ruoyi.business.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 bus_shop
 *
 * @author lzq
 * @date 2022-10-22
 */
@ApiModel(value = "商品对象")
public class BusShop extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "主键")
    private Long id;

    /** 名称 */
    @ApiModelProperty(value = "名称",required = true)
    @NotBlank(message = "名称为必填项")
    @Excel(name = "名称")
    private String name;

    /** 单位 */
    @ApiModelProperty(value = "单位",required = true)
    @NotBlank(message = "单位为必填项")
    @Excel(name = "单位")
    private String unit;

    /** 规格 */
    @ApiModelProperty(value = "规格")
    @Excel(name = "规格")
    private String specs;

    /** 价格 */
    @ApiModelProperty(value = "价格",required = true)
    @NotNull(message = "价格为必填项")
    @Excel(name = "价格")
    private BigDecimal price;

    /** 库存数量 */
    @ApiModelProperty(value = "库存",required = true)
    @NotNull(message = "库存为必填项")
    @Excel(name = "库存")
    private Integer stock;

    /** 条形码 */
    @ApiModelProperty(value = "条形码")
    @Excel(name = "条形码")
    private String barCode;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }
    public void setSpecs(String specs)
    {
        this.specs = specs;
    }

    public String getSpecs()
    {
        return specs;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setStock(Integer stock)
    {
        this.stock = stock;
    }

    public Integer getStock()
    {
        return stock;
    }
    public void setBarCode(String barCode)
    {
        this.barCode = barCode;
    }

    public String getBarCode()
    {
        return barCode;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("unit", getUnit())
            .append("specs", getSpecs())
            .append("price", getPrice())
            .append("stock", getStock())
            .append("barCode", getBarCode())
            .toString();
    }
}
